<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title>小米帐号 -修改密码</title>
    <link href="${pageContext.servletContext.contextPath}/st/front/CSS/reset.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.servletContext.contextPath}/st/front/CSS/layout.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.servletContext.contextPath}/st/front/CSS/modacctip.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.servletContext.contextPath}/images/milogo.png" rel="icon" type="image/x-icon">
    <style>
        html {
            overflow-y: scroll;
        }
    </style>

    <style type="text/css">
        /*启用修改头像功能*/
        .na-img-area:hover .na-edit {
            display: block;
            cursor: pointer;
        }

        .na-img-area {
            cursor: default
        }

        /*popup的遮层*/
        .popup_mask {
            position: fixed;
            z-index: 99;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            display: none;
            _position: absolute;
            _height: 1000px;
        }

        .popup_mask .mod_wrap {
            height: 100%;
            overflow-y: auto;
            position: absolute;
            width: 100%;
            z-index: 1;
        }

        .popup_mask .bkc {
            position: absolute;
            width: 100%;
            height: 200%;
            left: 0;
            top: 0;
            background-color: #333;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }

        .popup_mask .mod_acc_tip {
            display: none;
            position: absolute;
            left: 50%;
            margin-left: -206px;
            top: 50%;
            margin-top: -187px;
            _top: 500px;
        }

        input{
            border:1px solid #d2d2d2;
            background-color:transparent;
        }

        /*干掉该死的IE6的遮罩问题*/
        #loadingMask .bkc {
            _height: 2000px;
        }

        /*wap*/
        .bugfix_ie6 {
            display: block;
        }

        .info_notify {
            display: block;
        }
    </style>
</head>
<body class="zh_CN">
<div class="wrapper blockimportant">
    <div class="wrap">
        <div class="layout bugfix_ie6 dis_none">
            <div class="n-logo-area clearfix">
                <div class="fl-l">
                    <img src="${pageContext.servletContext.contextPath}/images/milogo.png">
                    <span class="logo_title">小米帐号</span>
                </div>
                <a class="fl-r logout" href="${pageContext.servletContext.contextPath}/Front_out" id="logoutLink">退出</a>
            </div>
            <!--头像 名字-->
            <div class="n-account-area-box">
                <div class="n-account-area clearfix">
                    <div class="na-info">
                        <p class="na-name">${user.uname}</p>
                        <p class="na-num">${user.pnumber}</p>
                    </div>
                    <div class="na-img-area fl-l">
                        <!--na-img-bg-area不能插入任何子元素-->
                        <div class="na-img-bg-area">
                            <img src="${pageContext.servletContext.contextPath}/images/${user.imagepath}">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layout">
            <div class="n-main-nav clearfix">
                <ul class="c_b">
                    <li class="current">
                        <a title="修改密码">修改密码</a>
                        <em class="n-nav-corner"></em>
                    </li>
                </ul>
            </div>
            <div class="n-frame">
                <div class="uinfo c_b">
                    <div>
                        <div class="main_l">
                            <div class="naInfoImgBox t_c">
                                <div class="na-img-area marauto">
                                    <!--na-img-bg-area不能插入任何子元素-->
                                    <div class="na-img-bg-area">
                                        <img src="${pageContext.servletContext.contextPath}/images/${user.imagepath}">
                                    </div>
                                    <em class="na-edit"></em>
                                </div>
                            </div>
                        </div>
                        <div class="main_r">
                            <div class="framedatabox">
                                <div class="fdata">
                                    <h3>修改密码</h3>
                                </div>
                                <div class="fdata lblnickname">
                                    <p>
                                        <span>&emsp;&emsp;&emsp;&emsp;昵称：</span>
                                        <span class="value">${user.uname}</span>
                                    </p>
                                </div>
                                <div class="fdata lblgender">
                                    <p>
                                        <span>&emsp;&emsp;&emsp;手机号：</span>
                                        <span class="value" val="m">${user.pnumber}</span>
                                    </p>
                                </div>
                                <div class="fdata lblgender">
                                    <p>
                                        <span>&emsp;&emsp;&emsp;原密码：</span>
                                        <span class="value1" val="m"><input type="password" name="password"></span>
                                    </p>
                                </div>
                                <div class="fdata lblgender">
                                    <p>
                                        <span>&emsp;&emsp;修改密码：</span>
                                        <span class="value2" val="m"><input type="password" name="password1"></span>
                                    </p>
                                </div>
                                <div class="fdata lblgender">
                                    <p>
                                        <span>再次确认密码：</span>
                                        <span class="value3" val="m"><input type="password" name="password2"></span>
                                    </p>
                                </div>
                                <div class="fdata lblgender">
                                    <button style="position: absolute;left: 700px;">修改密码</button>
                                </div>
                                <div>
                                    <span id="err" style="position: absolute;left: 700px;top: 500px; ">密码必须大于6位</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="logout_wap log-out">
            <a class="btnadpt bg_white" href="#">退出</a>
        </div>
    </div>
</div>
<div class="n-footer">
    <div class="nf-link-area clearfix">
        <ul class="lang-select-list">
            <li><a class="lang-select-li current" data-lang="zh_CN" href="javascript:void(0)">简体</a>|</li>
            <li><a class="lang-select-li" data-lang="zh_TW" href="javascript:void(0)">繁体</a>|</li>
            <li><a class="lang-select-li" data-lang="en" href="javascript:void(0)">English</a></li>|
            <li><a class="a_critical" href="JavaScript:void(0)" target="_blank"><em></em>常见问题</a></li>
        </ul>
    </div>
    <p class="nf-intro"><span>小米公司版权所有-京ICP备10046444-
					<a class="beianlink beian-record-link" href="#" target="_blank"><span>
                        <img src="${pageContext.servletContext.contextPath}/images/ghs.png">
						</span>京公网安备11010802020134号</a>-京ICP证110507号</span>
    </p>
</div>
<div id="img_cache" style="visibility:hidden;"></div>
</body>
<script type="text/javascript" src="${pageContext.servletContext.contextPath}/st/front/JS/jquery-3.2.1.min.js"></script>
<script>
    function UpdatePass(password1,password){
        $.get("${pageContext.servletContext.contextPath}/ajax_UpdatePass",{password1:password1,password:password},
            function (res){
            $("#err").html(res);
        })
    }

    $(function (){
        $("button").click(function (){
            var password=$("[name=password]").val();
            var password1=$("[name=password1]").val();
            var password2=$("[name=password2]").val();
            if(password1==password2&&password!=""){
                UpdatePass(password1,password);
            }else if(password1!=password2){
                //alert("俩次输入的密码不正确！");
                $("#err").html("俩次输入的密码不正确！");
                console.log("俩次输入的密码不正确！");
            }
        });
    })

</script>
</html>

